feat: Arkham integration - Address enrichment service#1573
Conversation
- Hono REST API with GET /address/:address endpoint - Arkham Intel API integration for entity/label data - EOA/contract detection (Arkham fallback to RPC) - PostgreSQL permanent storage via Drizzle ORM - CLI sync command to batch-fetch top delegates and holders - OpenAPI/Swagger documentation at /docs
- Fix GraphQL BigInt values (use strings instead of numbers) - Show voting power and balance with K/M/B formatting - Display Arkham data (entity, label, type) for all addresses - Show contract indicator for contract addresses
- POST /addresses accepts array of up to 100 addresses - Processes in parallel with concurrency limit of 10 - Returns results array and errors array for partial failures - Deduplicates addresses automatically
- Add address-enrichment as OpenAPI source in GraphQL Mesh - Exposes getAddressEnrichment and batchAddressEnrichment queries - Service is optional (only loaded if ADDRESS_ENRICHMENT_API_URL is set)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
5cbcad3 to
9f6f8b6
Compare
|
@claude review |
|
Claude finished @pikonha's task in 1m 54s —— View job Code Review — feat: Arkham integration - Address enrichment service
The existing review from @pikonha already covers many important issues. I'll focus on items not yet raised and add detail to a few that warrant more attention. Critical Issues1. No TestsZero test coverage on business-critical code. The most important missing tests:
2.
|
| Area | Assessment |
|---|---|
| Architecture | Clean separation of concerns, good use of Zod for external API parsing |
| Tests | None — blocker |
runMigrations |
execSync + --force at startup is dangerous in production |
| Schema contract | mapToResult doesn't match the nullable arkham schema |
| Sync script | Missing ENS fetch, unsafe address cast, --limit broken, duplicate logic |
| Security | Error leakage in both global handler and batch endpoint |
| Performance | Sync is fully sequential with 100ms delay |
Blocker: Tests and the runMigrations approach. The mapToResult null inconsistency is also a contract bug worth fixing before merge.
Summary
New microservice (
apps/address-enrichment) that enriches Ethereum addresses with identity data from Arkham Intel API.Features
Endpoints
GET /address/:address- Single address lookupPOST /addresses- Batch lookup (max 100)Tech Stack
Hono, Drizzle ORM, viem, Arkham Intel API
New Environment Variables